<div class="cms-form-message">
    Complete the form below to create a quick link
</div>
<form action="<?php echo $this->url(array('action' => 'add')); ?>" method="post" name="form2" id="form2">
    <table width="90%" align="center" cellpadding="6" cellspacing="0">
        <tr valign="baseline">
            <td width="18%" align="right" nowrap="nowrap"><strong>Link Category:</strong></td>
            <td colspan="3">
                <select id="LinkCategory" name="LinkCategory"><?php 
                
                for($i = 0; $i < count($categories); $i++) {
                    $id = $categories[$i]->getCategoryId();
                    $catName = $categories[$i]->getCategoryName();
                    
                    echo "<option value='$id'>$catName</option>";
                }
                ?>
                </select>
            </td>
        </tr>
        <tr valign="baseline">
            <td nowrap="nowrap" align="right"><strong>Quick Link Name:</strong></td>
            <td colspan="3">
                <input type="text" name="LinkName" value="" size="40" />
            </td>
        </tr>
        <tr valign="baseline">
            <td nowrap="nowrap" align="right" valign="top"><strong>Description:</strong></td>
            <td colspan="3">
                <textarea name="LinkDesc" cols="40" rows="3"></textarea>
            </td>
        </tr>
        <tr valign="baseline">
            <td nowrap="nowrap" align="right"><strong>Link URL:</strong></td>
            <td colspan="3">
                <input class="page-linker" type="text" id="LinkURL" name="LinkURL" value="http://" size="45" />
            </td>
        </tr>
        <tr >
            <td nowrap="nowrap" align="right"><strong>Target:</strong></td>
            <td width="32%">
                <select name="LinkTarget" id="LinkTarget">
                    <option value="_self" >Open In Same Window/Tab</option>
                    <option value="_blank" >Open In New Window/Tab</option>
                </select>
            </td>
            <td width="10%" align="right" nowrap="nowrap"><strong>Position:</strong></td>
            <td width="40%">
                <input name="LinkPosition" type="text" id="LinkPosition" value="1" size="4" style="text-align:center;" />
            </td>
        </tr>
        <tr valign="baseline">
            <td nowrap="nowrap" align="right"><strong>Published:</strong></td>
            <td colspan="3">
                <input name="Published" type="checkbox" id="Published" value="true" />
            </td>
        </tr>
        <tr valign="baseline">
            <td nowrap="nowrap" align="right">&nbsp;</td>
            <td colspan="3">&nbsp;</td>
        </tr>
        <tr valign="baseline">
            <td nowrap="nowrap" align="right">&nbsp;</td>
            <td colspan="3">
                <input type="submit" value="Create Quick Link" />
                <input type="button" name="Cancel2" id="Cancel2" value="Cancel" onclick="window.location.href = '<?php echo $this->url(array('action' => 'index')); ?>'" />
            </td>
        </tr>
    </table>
    <input type="hidden" name="MM_insert" value="form2" />
</form>